package com.vca.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.vca.common.model.talk.TalkScheduling;
import com.vca.common.request.*;
import com.vca.common.response.AdminHeaderResponse;
import com.vca.common.response.TalkSchedulingAdminByIdResponse;
import com.vca.common.response.TalkSchedulingAdminResponse;
import com.vca.common.vo.ExcelTalkSchedulingById;

import java.util.List;

/**
 * <p>
 * 讲座排期表 服务类
 * </p>
 *
 * @author chenBing
 * @since 2022-11-03
 */
public interface TalkSchedulingService extends IService<TalkScheduling> {

    /**
     * 讲座排课列表
     *
     * @return
     * @author Li
     * @date 2022/11/15 15:43
     */
    PageInfo getAdminList(SchedulingAdminListRequest request, PageParamRequest pageParamRequest);

    ExcelTalkSchedulingById getBookingDetail(String id, PageParamRequest pageParamRequest);

    /**
     * 讲座排期日历列表
     *
     * @return
     * @author Li
     * @date 2022/11/18 16:32
     */
    List<TalkSchedulingAdminResponse> getCalendarList(SchedulingAdminListRequest request);

    /**
     * 添加讲座排期
     *
     * @return
     * @author Li
     * @date 2022/11/18   17:27
     */
    boolean addScheduling(SchedulingAddRequest<TalkSchedulingAddRequest> request);

    /**
     * 修改讲座排期
     *
     * @return
     * @author Li
     * @date 2022/11/18   17:27
     */
    boolean updateScheduling(TalkSchedulingAddRequest request);

    /**
     * 跟据讲座id查询排期
     *
     * @param talkId
     * @return
     * @author Li
     * @date 2022/11/21 09:47
     */
    TalkSchedulingAdminByIdResponse getAdminScheduling(Long talkId);

    /**
     * 根据讲座排期id删除排期
     *
     * @param schedulingId
     * @return
     * @author Li
     * @date 2022/11/21 14:55
     */
    boolean deleteScheduling(Long schedulingId);

    /**
     * @return
     * @author Li
     * @date 2022/11/24
     */
    List<AdminHeaderResponse> getHeader(String dateLimit, String talkType);

    /**
     * 上架讲座排期预约状态
     *
     * @param talkSchedulingId 讲座排期id
     * @return
     * @author Li
     * @date 2022/11/18 15:16
     */
    boolean onShell(Long talkSchedulingId);

    /**
     * 下架讲座排期预约状态
     *
     * @param talkSchedulingId 讲座排期id
     * @return
     * @author Li
     * @date 2022/11/18 15:16
     */
    boolean offShell(Long talkSchedulingId);


    /**
     * 跟据讲座id查询排期
     *
     * @param talkId
     * @param pageParamRequest
     * @return
     * @author Li
     * @date 2022/11/21 09:47
     */
    PageInfo<TalkSchedulingAdminByIdResponse> getListByTalk(Long talkId, PageParamRequest pageParamRequest);

    /**
     * @param request
     * @return java.lang.Boolean
     * @description 线上讲座绑定微吼直播
     * @author Li
     * @date 2022/12/27 14:52
     */
    Boolean TalkBindingVhall(TalkBindingVhallRequest request);

    /**
     * @param request
     * @return boolean
     * @description 取消讲座排期
     * @methodName cancel
     * @author Li
     * @date 2022/12/28 16:15
     */
    boolean cancel(SchedulingCancelRequest request);

    /**
     * @Description:判断讲座排期是否还有空余席位
     * @author:chenbing
     * @date 2023/9/18 16:57
     */
    boolean checkSchedulingQuta(Long mainId);

    /**
     * @Description:判断当前排期似乎否已经过了停止预约的时间
     * @author:chenbing
     * @date 2023/9/19 13:44
     */
    boolean checkSchedulingDate(TalkScheduling talkScheduling, Long mainId);
}
